/**
 * Ingenius-Group S.A.S
 *
 * Project: SAU
 * File: EditFactorEvent.java
 * Date: 07/02/2011
 */

package com.ingenius.sau.client.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.ingenius.sau.client.event.EditFactorEvent.EditFactorEventHandler;

/**
 * Class <strong>EditFactorEvent</strong>
 * 
 * @author Jesus David
 * @version 0.1
 */
public class EditFactorEvent extends GwtEvent<EditFactorEventHandler> {

	public interface EditFactorEventHandler extends EventHandler {

		void onEditFactor(EditFactorEvent event);
	}

	public static Type<EditFactorEventHandler> TYPE = new Type<EditFactorEventHandler>();

	private final String factorId;

	public EditFactorEvent(String factorId) {
		this.factorId = factorId;
	}

	public String getFactorId() {
		return factorId;
	}

	@Override
	public Type<EditFactorEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(EditFactorEventHandler handler) {
		handler.onEditFactor(this);
	}

}
